import axios from "axios";

/*export function getArtsData() {
  return axios({
    url: "http://localhost:3000/articles"
  })
}*/
export const getArtsData = () => {
  return axios({
    url: "http://localhost:3000/articles"
  });
};

export const createArticle = data => {
  console.log(data);
  return axios({
    method: "POST",
    url: "http://localhost:3000/articles",
    data
  });
};

export const getTodosData = () => {
  return axios({
    url: "https://api.yizhanketang.cn/api/v1/todos"
  });
};
